package cn.edu.sanxiau.www.servier.impl;

import java.util.List;

import cn.edu.sanxiau.www.dao.UserDao;
import cn.edu.sanxiau.www.dao.impl.UserDaoImpl;
import cn.edu.sanxiau.www.model.User;
import cn.edu.sanxiau.www.servier.UserServier;

public class UserServierImpl implements UserServier {
    //注入数据访问对象ע
    UserDao userDao = new UserDaoImpl();

    public User queryUserByUser(User user) {

        return userDao.queryUserByUser(user);
    }

    @Override
    public int addUserByUser(User user) {
        return userDao.addUserByUser(user);
    }

    @Override
    public List<User> queryAllUser() {
        return userDao.queryAllUser();
    }

    @Override
    public int deleteUserByUser_id(int user_id) {
        return userDao.deleteUserByUser_id(user_id);
    }

    @Override
    public User queryUserByUser_id(int user_id) {
        return userDao.queryUserByUser_id(user_id);
    }

    @Override
    public int updateUserByUser(User user) {


        return userDao.updateUserByUser(user);
    }

}
